<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:ice="http://www.icesoft.com/icefaces/component"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"	
	xmlns:ace="http://www.icefaces.org/icefaces/components">

<ui:composition template="/WEB-INF/AdminTemplate/AdminTemplate.xhtml">
	<ui:define name="content">
Hello <ice:outputText value="#{adminLoginMB.username_}"></ice:outputText>
		<br />Sau đây là các ví dụ sử dụng các component ace :
		<br />
		<br />
		<br />
		<ice:form>
			<ace:dataTable binding="#{adminMB.datas}" id="dtAdmin" value="#{adminMB.arrAdmin}"
				var="var" paginator="true" paginatorPosition="bottom" rows="2" page="1" pageCount="4">
				<ace:column>
					<ice:selectBooleanCheckbox  binding="#{adminMB.checkbox}"></ice:selectBooleanCheckbox>
				</ace:column>
				<ace:column  filterBy="#{var.username}" filterMatchMode="contains"
					headerText="UserName" sortBy="UserName">
					<h:outputText value="#{var.username}"></h:outputText>
				</ace:column>
				<ace:column filterBy="#{var.address}" filterMatchMode="contains"
					headerText="Address" sortBy="Address">
					<h:outputText value="#{var.address}"></h:outputText>
				</ace:column>
				<ace:column filterBy="#{var.phonenumber}" filterMatchMode="contains"
					headerText="Phone" sortBy="Phone">
					<h:outputText value="#{var.phonenumber}"></h:outputText>
				</ace:column>
				<ace:column filterBy="#{var.gender}" filterMatchMode="contains"
					headerText="Gender" sortBy="Gender">							
					<h:outputText value="Nam" rendered="#{var.sex==true}"></h:outputText>
					<h:outputText value="Nữ" rendered="#{var.sex==false}"></h:outputText>
				</ace:column>				
			</ace:dataTable>
			<ice:commandButton value="Thêm" action="#{adminMB.submit}"></ice:commandButton>
			<ice:commandButton value="Thêm" action="#{adminMB.doAdd}"></ice:commandButton>
			<ice:commandButton value="Sửa" action="#{adminMB.doEdit}"></ice:commandButton>
			<ice:commandButton value="Xóa" action="#{adminMB.doDelete}"></ice:commandButton>
			</ice:form>
	</ui:define>
</ui:composition>

</html>

